package com.own.demo.lwf.sentence;/**
 * @author liwenfeng
 * @date 2022/8/28 0028
 * @apinote
 */

/**
 * @version v1.0
 * @Description:
 * @Author Administrator
 * @Date 2022/8/28 0028 16:28
 * @copyright 李文峰
 */
public class WhileAdd {
    public static void main(String[] args) {
        int sum = 0;
        int i = 1;
       /* while(i<=100){
            sum+=i;
            i++;
        }
        System.out.println(sum);*/


        do{
            sum+=i;
            i++;
        }while(i<=100);
        System.out.println(sum);
    }
}
